<?php
namespace App\Models\Operation;

use App\Models\Base\Photo;
use App\Models\Base\Task;
use Illuminate\Database\Eloquent\Relations\MorphMany;
use Illuminate\Database\Eloquent\Relations\MorphOne;

class VehicleRepair extends BaseModel
{
    protected $table = 'beesoft_vehicle_repairs';
    protected $fillable = [
        'name',
        'email',
        'phone',
        'password',
    ];
    protected $hidden = [
        'password',
        'remember_token',
    ];
    protected $casts = [
        'email_verified_at' => 'datetime',
    ];

    public function task(): MorphOne
    {
        return $this->morphOne(Task::class, 'morph');
    }
    public function photos(): MorphMany
    {
        return $this->morphMany(Photo::class, 'morph');
    }
}
